﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>    


<head>
	<script type="text/javascript">
		$(function(){
				init();
			
		});
		
			function init(){
				$('#t-dg').datagrid({
				loadMsg:''
				
			});
				
			}

			function viewItem(){
				var t = $('#t-dg');
				if (isSingleSelect(t)){
				var row = t.datagrid('getSelected');
				if (row){
					parent.open2('<c:url value="/read/Esinfo/showEstateInfo"/>?id=' + row.id,'房源编号：'+row.local_id);
					
					
					
				}
				}
				
				
			}
			
    function viewItem1(){
    	var t = $('#t-dg');
			var row = t.datagrid('getSelected');
			if (row){
				
				
				$.ajax({
					url:'<c:url value="/read/Proofrinfo/viewProofrinfo"/>?id=' + row.id,
					type:'post',
					success:function(data){
						  alert(data);
					}
				});
			
				
			}
    	}
		
		function deleteItem(){
			var t = $('#t-dg');
			var row = t.datagrid('getSelected');
			if (row){
				
				$.messager.confirm('删除确认', '是否确定要删除选择的校对信息?', function(r){
						if (r){
				$.ajax({
					url:'<c:url value="/read/Proofrinfo/destroyProofrinfo"/>?id=' + row.id,
					type:'post',
					success:function(){
						$('#t-dg').datagrid('reload');
					}
				});
			}});
				
			}
		}
		
		function deleteAllItem(){
			
				
				$.messager.confirm('批量删除确认', '是否确定要删除所有校对信息?', function(r){
						if (r){
				$.ajax({
					url:'<c:url value="/read/Proofrinfo/destroyAllProofrinfo"/>',
					type:'post',
					success:function(){
						$('#t-dg').datagrid('reload');
					}
				});
			}});
				
			
		}
		
		
		
	</script>
</head>
<body>
	<div class="easyui-layout" fit="true">
		<div region="north" border="false" style="height:40px;padding:5px;overflow:hidden;">
					<div style="padding-top:6px;float:left;color:blue;font-weight:700">
			请校对以下信息，如不存在，请删除！
			</div>
		<div style="float:right">
		    <a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="viewItem()">查看房源信息</a>		
			<a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="viewItem1()">查看校对内容</a>
			<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" plain="true" onclick="deleteAllItem()">批量删除</a>
			<a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="deleteItem()">删除选择</a>
		</div>
		</div>
		
		
		<div region="center" border="true">
			<table id="t-dg" style="display:none;"
					url="<c:url value='/read/proofrinfo/getNewProofrinfoItems'/>"
					singleSelect="true" rownumbers="true" pagination="true"
					border="false" fit="true" >
				<thead>
					<tr>
						<th field="local_id" width="100" sortable="false">房源编号</th>
<th field="selfcode" width="100" sortable="false">自编号</th>
<th field="editdate" width="100" sortable="false">录入时间</th>
<th field="mode" width="100" sortable="false">方式</th>
<th field="city" width="100" sortable="false">城市名</th>
<th field="region" width="100" sortable="false">地区</th>
<th field="address" width="100" sortable="false">地址</th>
<th field="circs" width="100" sortable="false">类别</th>
<th field="purpose" width="100" sortable="false">规格</th>
<th field="layer" width="100" sortable="false">楼层</th>
<th field="direction" width="100" sortable="false">方向</th>
<th field="room" width="100" sortable="false">房间</th>
<th field="area" width="100" sortable="false">面积</th>
<th field="price" width="100" sortable="false">价格</th>
<th field="unit" width="100" sortable="false">价格单位</th>
<th field="totalprice" width="100" sortable="false">总价</th>
<th field="scheduled_flag" width="100" sortable="false">钥匙</th>
<th field="memo" width="100" sortable="false">备注</th>
<th field="unitname" width="100" sortable="false">单位名称</th>
<th field="oper" width="100" sortable="false">操作人员</th>
<th field="display" width="100" sortable="false">显示限制</th>
<th field="totop" width="100" sortable="false">置顶</th>
<th field="toweb" width="100" sortable="false">网站显示</th>
<th field="fitment" width="100" sortable="false">装修</th>
<th field="wg" width="100" sortable="false">外观</th>
<th field="qt" width="100" sortable="false">其它</th>
<th field="sj" width="100" sortable="false">实价</th>
<th field="usr_op_type" width="100" sortable="false">信息类型</th>

					</tr>
				</thead>
			</table>
		</div>
	</div>
	


	

</body>
